
pkgname=python2-m2crypto
pkgver=0.27.0
pkgrel=1
pkgdesc="A crypto and SSL toolkit for Python"
arch=('x86_64')
url="https://gitlab.com/m2crypto/m2crypto"
license=('BSD')
depends=('python2' 'openssl')
makedepends=('swig' 'python2-distribute')
source=("https://pypi.python.org/packages/01/bd/a41491718f9e2bebab015c42b5be7071c6695acfa301e3fc0480bfd6a15b/M2Crypto-${pkgver}.tar.gz"
        "https://gitlab.com/m2crypto/m2crypto/raw/master/LICENCE")
md5sums=('4477bd6b2835560c73982476dba5e515'
         'b0e1f0b7d0ce8a62c18b1287b991800e')

build() {
  cd M2Crypto-${pkgver}
   
  python setup.py build
}

package() {
  cd M2Crypto-${pkgver}
  
  python2 setup.py install --root=${pkgdir}/ --optimize=1

  install -D -m644 ${srcdir}/LICENCE ${pkgdir}/usr/share/licenses/${pkgname}/LICENSE
}
